import App from './App'
import Vue from 'vue'


Vue.config.productionTip = false

App.mpType = 'app'
/** vuex 持久化*/
// 全局存储 vuex 的封装
import store from '@/store';
// 引入 uView 提供的对 vuex 的简写法文件
let vuexStore = require("@/store/$u.mixin.js");
Vue.mixin(vuexStore);

//uview库
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
uni.$u.config.unit = 'rpx'

//全局方法挂载
import * as Verify from '@/utils/validate'
import * as Tip from '@/utils/tip'
import config from '@/config/config.js'
import utils from "@/utils/utils";
import dayjs from "dayjs";

Vue.prototype.$V = Verify
Vue.prototype.$T = Tip
Vue.prototype.$U = utils
Vue.prototype.$C = config
Vue.prototype.$D = dayjs

//微信小程序全局分享
import share from '@/utils/wxShare.js'	// 导入并挂载全局的分享方法
Vue.mixin(share)

//请求
import requsest from '@/utils/request.js'
Vue.prototype.$baseURL = config.baseURL;
Vue.use(requsest, app)

// 实例化应用
const app = new Vue({
    store,
    ...App
})
app.$mount()
